package org.gourpg.model.chat;


import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;

public class ChatPersonDetail {
    /**
     * 聊天室编号
     */
    private Integer chatId;

    /**
     * 聊天人
     */
    private Integer chatPersonId;

    /**
     * 人员角色（发起人1、管理者、普通聊天人）字典：CHAT_PERSON_TYPE
     */
    private Integer chatPersonType;

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("chatId", chatId)
                .add("chatPersonId", chatPersonId)
                .add("chatPersonType", chatPersonType)
                .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        ChatPersonDetail that = (ChatPersonDetail) o;
        return Objects.equal(getChatId(), that.getChatId()) && Objects.equal(getChatPersonId(), that.getChatPersonId()) && Objects.equal(getChatPersonType(), that.getChatPersonType());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getChatId(), getChatPersonId(), getChatPersonType());
    }

    public Integer getChatId() {
        return chatId;
    }

    public void setChatId(Integer chatId) {
        this.chatId = chatId;
    }

    public Integer getChatPersonId() {
        return chatPersonId;
    }

    public void setChatPersonId(Integer chatPersonId) {
        this.chatPersonId = chatPersonId;
    }

    public Integer getChatPersonType() {
        return chatPersonType;
    }

    public void setChatPersonType(Integer chatPersonType) {
        this.chatPersonType = chatPersonType;
    }

    public ChatPersonDetail(Integer chatId, Integer chatPersonId, Integer chatPersonType) {
        this.chatId = chatId;
        this.chatPersonId = chatPersonId;
        this.chatPersonType = chatPersonType;
    }
}
